package com.example.demo.filter;

import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
import org.springframework.stereotype.Component;

/**
 * @Package: com.example.demo.filter
 * @ClassName: LogFilter2
 * @Author: Think
 * @CreateTime: 2021/7/12 14:28
 * @Description:
 */
@Component
public class LogFilter2 extends AbstractGatewayFilterFactory {
    @Override
    public GatewayFilter apply(Object config) {
        return (exchange,chain) -> {
            System.out.println("LogFilter2 flitered!!!");
            return chain.filter(exchange);
        };
    }
}
